package com.jet.merchant.service.impl;

import com.jet.core.utils.IdUtil;
import com.jet.merchant.domain.entity.ClerkHandover;
import com.jet.merchant.mapper.ClerkHandoverMapper;
import com.jet.merchant.service.IClerkHandoverService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-02-25
 */
@Service
public class ClerkHandoverServiceImpl extends ServiceImpl<ClerkHandoverMapper, ClerkHandover> implements IClerkHandoverService {

    @Override
    public void save(long merchantNo, long storeNo, String accountId, int type) {
        ClerkHandover entity = new ClerkHandover();
        entity.setId(IdUtil.generateLower());
        entity.setMerchantNo(merchantNo);
        entity.setStoreNo(storeNo);
        entity.setAccountId(accountId);
        entity.setType(type);
        entity.setHandoverTime(LocalDateTime.now());
        super.save(entity);
    }
}
